Saudi Arabia severed diplomatic ties with Qatar in June, 2017 over Doha's alleged support of terrorism, an accusation Qatar denies.
Asian Cup hosts the United Arab Emirates stand squarely behind the Gulf blockade of Qatar and the mood was highly charged - even if the football at times wasn't.
Both teams had already qualified from Group E after winning their first two matches and it was Saudi Arabia who almost broke through after 22 minutes when striker Fahad Almuwallad slammed a right-foot shot against the post.
Qatar captain Hasan Al-Haydos missed a penalty in the 42nd minute after Ali had been clattered in the box.
But Ali, who plundered four goals in Qatar's 6-0 rout of North Korea last weekend, made no mistake in first-half stoppage time.
He calmly slotted the ball past Saudi goalkeeper Mohammed Alowais to stun the partisan crowd and become the first player to score six goals in a single Asian Cup since South Korea's Lee Dong-gook in 2000.
Ali subsequently headed in a seventh goal of the tournament 10 minutes from time, celebrating with a jig of delight that further antagonised the crowd.